using System;

namespace NetduinoHappyHour.Util
{
    /// <summary>
    /// Boolean helper class, due the fact microframework does not support 
    /// bool.Parse(string)
    /// </summary>
    public class BooleanHelper
    {
        /// <summary>
        /// "Parses" every string to bool
        /// </summary>
        /// <param name="Value">The string value to be parsed</param>
        /// <returns>true for every typing of "TrUe", false for anything else</returns>
        public static bool Parse(string Value)
        {
            if (Value == null)
            {
                return false;
            }
            return bool.TrueString.ToUpper().Equals(Value.ToUpper());
        }
    }
}
